Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Expose the origin of exit points in zend_jit_dump_exit_info() #19700

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
arnaud-lb wants to merge 3 commits into php:master from arnaud-lb:exit-point-dbg

Conversation

Copy link
Member

@arnaud-lb arnaud-lb commented Sep 4, 2025

This shows the filename/lineno where zend_jit_trace_get_exit_point() was called in zend_jit_dump_exit_info(), in debug builds:

---- TRACE 95 exit info
 exit_0: 0025/0000/7 CV2($flags):array CV3($i):int CV4($k):int X6:int ext/opcache/jit/zend_jit_ir.c:16857
 exit_1: 0028/0007/7 CV2($flags):array CV3($i):int CV4($k):int X6:int ext/opcache/jit/zend_jit_trace.c:5432
 exit_2: 0004/0014/7/VM CV1($count):int CV2($flags):array CV3($i):int CV4($k):int X6:int ext/opcache/jit/zend_jit_ir.c:8516
 exit_3: 0008/0021/7/VM CV1($count):int CV2($flags):array CV3($i):int CV4($k):int X6:int ext/opcache/jit/zend_jit_ir.c:10692

This is quite useful, since the dump doesn't generally allows to find where an exit point was created:

  • The opnum refers to the exit opline, not the one that generated the exit point
  • A single op may generate multiple exit points

Copy link
Member

@dstogov dstogov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wouldn't like to merge this information into trace dumps.
It doesn't reflect the properties of the trace, just very specific implementation details.
I think, this may be done under the special debug flag disabled by default.

arnaud-lb reacted with thumbs up emoji
Copy link
Member Author

@dstogov I've made the change to collect the filename/lineno only when ZEND_JIT_DEBUG_TRACE_EXIT_INFO is set.

I find this very useful when debugging, as it's difficult to find where an exit point was created in some cases.

@arnaud-lb arnaud-lb requested a review from a team September 15, 2025 09:52
Copy link
Member

@DanielEScherzer DanielEScherzer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

RM approval, technical review not performed
If I understand correctly this adds a new flag for JIT debugging, can you document that in the UPGRADING file?

arnaud-lb reacted with thumbs up emoji
Copy link
Member Author

Unfortunately I missed the notification, so it will not be in 8.5. Not a big issue. I will document the new flag in UPGRADING 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers

@dstogov dstogov dstogov approved these changes

@DanielEScherzer DanielEScherzer DanielEScherzer approved these changes

Assignees
No one assigned
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /